DevForce Help Reference
SetValue(Object,Object) Method
Example 


Sets the value for this property on the selected instance.
Syntax
'Declaration
 
Public Overloads Overrides Sub SetValue( _
   ByVal instance As Object, _
   ByVal newValue As Object _
) 
'Usage
 
Dim instance As DataEntityProperty(Of TInstance,TValue)
Dim instance As Object
Dim newValue As Object
 
instance.SetValue(instance, newValue)
public override void SetValue( 
   object instance,
   object newValue
)

Parameters

instance
newValue
Remarks
Any registered IdeaBlade.Validation.VerifierExecutionModes.OnBeforeSetTriggers and IdeaBlade.Validation.VerifierExecutionModes.OnAfterSetTriggers verifiers will be executed based on the IdeaBlade.Validation.VerifierOptions.ExecutionModes in effect.

All setter interceptor actions are called when using this method. This method is called from auto-generated properties in the domain model.

Example
// Sample auto-generated property

/// Gets or sets the LastName. 
[Bindable(true, BindingDirection.TwoWay)]
[Editable(true)]
[Display(Name="LastName", AutoGenerateField=true)]
[IbVal.ValidateProperty]
[IbVal.StringLengthVerifier(MaxValue=30, IsRequired=true, ErrorMessageResourceName="Employee_LastName")]
[DataMember]
public string LastName {
  get { return PropertyMetadata.LastName.GetValue(this); }
  set { PropertyMetadata.LastName.SetValue(this, value); }
}
#endregion LastName property
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataEntityProperty<TInstance,TValue> Class
DataEntityProperty<TInstance,TValue> Members
Overload List

Send Feedback